package com.ljx.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 商家信息表
 * @TableName b_business_info
 */
@TableName(value ="b_business_info")
@Data
public class BusinessInfo implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 商家头像
     */
    private String bicon;

    /**
     * 店铺名
     */
    private String sname;

    /**
     * 商家身份证上显示的名字
     */
    private String bname;

    /**
     * 入驻时间
     */
    private String enterdate;

    /**
     * 营业执照
     */
    private String license;

    /**
     * 手机号
     */
    private String telephone;

    /**
     * 支付宝账号
     */
    private String ailiappid;

    /**
     * 状态 0营业 1休息 2整顿
     */
    private Integer state;

    /**
     * 身份证正面
     */
    private String cardfront;

    /**
     * 身份证反面
     */
    private String cardreverse;

    /**
     * 商家余额
     */
    private Double money;

    /**
     * 申请时间
     */
    private String applicationdate;

    /**
     * 通过或不通过原因
     */
    private String reason;

    /**
     * 审核人
     */
    private String checker;

    /**
     * 身份证号
     */
    private String idcard;

    /**
     * 商家密码
     */
    private String password;

    /**
     * 盐
     */
    private String salt;

    /**
     * 营业类别 生鲜0 水果1 海鲜3 有机蔬菜4 
     */
    private String sortid;

    /**
     * 用户申请商家审核审核状态  2待审核 1驳回 0成功
     */
    private Integer status;

    /**
     * 店铺地址
     */
    private String address;

    /**
     * 连表查询sort
     */
    @TableField(exist = false)
    private Sort sort;

    @TableField(exist = false)
    private ZoneBusiness zoneBusiness;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BusinessInfo other = (BusinessInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBicon() == null ? other.getBicon() == null : this.getBicon().equals(other.getBicon()))
            && (this.getSname() == null ? other.getSname() == null : this.getSname().equals(other.getSname()))
            && (this.getBname() == null ? other.getBname() == null : this.getBname().equals(other.getBname()))
            && (this.getEnterdate() == null ? other.getEnterdate() == null : this.getEnterdate().equals(other.getEnterdate()))
            && (this.getLicense() == null ? other.getLicense() == null : this.getLicense().equals(other.getLicense()))
            && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
            && (this.getAiliappid() == null ? other.getAiliappid() == null : this.getAiliappid().equals(other.getAiliappid()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getCardfront() == null ? other.getCardfront() == null : this.getCardfront().equals(other.getCardfront()))
            && (this.getCardreverse() == null ? other.getCardreverse() == null : this.getCardreverse().equals(other.getCardreverse()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getApplicationdate() == null ? other.getApplicationdate() == null : this.getApplicationdate().equals(other.getApplicationdate()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getChecker() == null ? other.getChecker() == null : this.getChecker().equals(other.getChecker()))
            && (this.getIdcard() == null ? other.getIdcard() == null : this.getIdcard().equals(other.getIdcard()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
            && (this.getSortid() == null ? other.getSortid() == null : this.getSortid().equals(other.getSortid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBicon() == null) ? 0 : getBicon().hashCode());
        result = prime * result + ((getSname() == null) ? 0 : getSname().hashCode());
        result = prime * result + ((getBname() == null) ? 0 : getBname().hashCode());
        result = prime * result + ((getEnterdate() == null) ? 0 : getEnterdate().hashCode());
        result = prime * result + ((getLicense() == null) ? 0 : getLicense().hashCode());
        result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
        result = prime * result + ((getAiliappid() == null) ? 0 : getAiliappid().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getCardfront() == null) ? 0 : getCardfront().hashCode());
        result = prime * result + ((getCardreverse() == null) ? 0 : getCardreverse().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getApplicationdate() == null) ? 0 : getApplicationdate().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getChecker() == null) ? 0 : getChecker().hashCode());
        result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
        result = prime * result + ((getSortid() == null) ? 0 : getSortid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bicon=").append(bicon);
        sb.append(", sname=").append(sname);
        sb.append(", bname=").append(bname);
        sb.append(", enterdate=").append(enterdate);
        sb.append(", license=").append(license);
        sb.append(", telephone=").append(telephone);
        sb.append(", ailiappid=").append(ailiappid);
        sb.append(", state=").append(state);
        sb.append(", cardfront=").append(cardfront);
        sb.append(", cardreverse=").append(cardreverse);
        sb.append(", money=").append(money);
        sb.append(", applicationdate=").append(applicationdate);
        sb.append(", reason=").append(reason);
        sb.append(", checker=").append(checker);
        sb.append(", idcard=").append(idcard);
        sb.append(", password=").append(password);
        sb.append(", salt=").append(salt);
        sb.append(", sortid=").append(sortid);
        sb.append(", status=").append(status);
        sb.append(", address=").append(address);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
    @TableField(exist = false)
    private Order order;
    @TableField(exist = false)
    private Zone zone;
}